let result = foo instanceof Foo ? foo.bar() : null;